<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/common/taglibs.jsp"%>
<%@include file="/common/meta.jsp"%>
<title>增加职位</title>
</head>
<body>
	
	<form id="jobForm" action="<c:url value='/pf/job/aJob'/>" method="post" autocomplete="off">
		<table class="add_form">
			<tr>
				<td align="right" width="30%">
					<label>职位名称:</label>
				</td>
				<td width="70%">
					<input name="jobName" class="add_input" required/>
				</td>
			</tr>
			<tr>
				<td align="right">
					<label>是否有效:</label>
				</td>
				<td>
					<input type="radio" checked="checked" name="jobIsvalid" value="1" />有效
					<input type="radio" name="jobIsvalid" value="0"/>无效
				</td>
			</tr>
			<tr>
				<td align="right">
					<label>排序值:</label>
				</td>
				<td>
					<input name="jobOrderno" class="add_input" required/>
				</td>
			</tr>
			<tr>
				<td align="right">
					<label>备注:</label>
				</td>
				<td>
					<textarea rows="" cols=""  name="jobMemo" class="add_textarea"></textarea>
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center">
					<input id="submit" type="button" value="保存"/>
				</td>
			</tr>
		</table>
	</form>
	
	<script type="text/javascript">
		$(function() {
			var ajax_option = {
				success:function(data, status, xhf) {
					if("success" == status) {
						//关闭窗口，刷新父页面
						parent.closeAndRefresh();
					} else {
						art.dialog.alert(data.msg);
					}
				}
			};
			$("#jobForm").ajaxForm();
			$("#submit").click(function() {
				if($("#jobForm").valid()) {
					$("#jobForm").ajaxSubmit(ajax_option);
				}
			});
		});
	</script>
</body>
</html>